<!-- 订单详情 -->
<template>
	<view class="order-detail-wrap">

		<view class="mask-loading" v-if="mask">
			<u-loading mode="circle" show size="60" color='#fb544c'></u-loading>
			<view class="" style="margin-top: 20rpx;">
				加载中...
			</view>
		</view>
		<!-- 订单状态 -->
		<view class="detail-head" :style="orderDetail.consignee ? '' : 'height:120rpx'">
			<view class="state-box u-flex">
				<image class="state-img" :src="$IMG_URL + '/imgs/order/order_state1.png'" mode="aspectFill"></image>
				<text>{{ orderDetail.status_desc }}</text>
			</view>
		</view>


		<!-- 收货地址 -->
		<!-- 	<view class="address-wrap" v-if="orderDetail.consignee">
			<view class="order-address-box">
				<view class="u-flex">
					<text class="address-username">{{ orderDetail.consignee }}</text>
					<text class="address-phone">{{ orderDetail.phone }}</text>
				</view>
				<view class="address-detail">{{ orderDetail.province_name }}{{ orderDetail.city_name }}{{ orderDetail.area_name }}{{ orderDetail.address }}</view>
			</view>
		</view> -->

		<view class="detail-goods">
			<!-- 订单信息 -->
			<view class="order-list" v-for="order in orderDetail.item" :key="order.id">
				<view class="order-card" @tap="jump('/pages/goods/detail', { id: order.goods_id })">
					<shopro-mini-card :title="order.goods_title" :image="order.goods_image">
						<template #describe>
							<view class="order-sku u-ellipsis-1">
								<view class="" style="margin-bottom: 12rpx;">
									规格:{{ order.goods_sku_text ? order.goods_sku_text : '' }}
								</view>
								<view class="" style="margin-bottom: 12rpx;" v-if='orderDetail.end.day'>
									租期：{{orderDetail.createtime_text}}--{{orderDetail.end.day ||''}}
								</view>
								<view class="">
									数量:{{ order.goods_num || 0 }};
								</view>
								<!-- <text class="order-num"></text> -->

							</view>
						</template>
						<template #cardBottom>
							<view class="card-price-box u-flex" style="text-align: right;justify-content: flex-end;">
								<text class="order-price font-OPPOSANS" style="font-weight: 400;">总租金 <text
										style="font-size: 32rpx;font-weight: 600;">￥{{ order.goods_price || 0 }} </text>
									<text style="margin-left: 20rpx;"
										v-if="orderDetail.stages.length">共{{orderDetail.stages.length||''}}期</text>
								</text>
								<!-- <button class="u-reset-button status-btn" v-if="order.status_name">{{ order.status_name }}</button> -->
							</view>
						</template>
					</shopro-mini-card>
				</view>
				<!-- 配送方式 -->
				<!-- <view class="express-type-box u-flex u-row-between"> -->
				<!-- <view class="u-flex">
						<view class="express-type-title">配送：</view>
						<view class="express-type-content">{{ expressType[order.dispatch_type] }}</view>
					</view>
				
					<view
						class="u-flex express-type-detail"
						
					
					>
						<text>详情</text>
						<text class="u-iconfont uicon-arrow-right" style="color: #666;"></text>
					</view> -->
				<!-- </view> -->

				<view class="order-bottom u-flex">

					<!-- <view class="refund_msg" v-if="order.refund_msg">
						<text class="refund-title">退款原因：</text>
						{{ order.refund_msg }}
					</view> -->
					<!-- 	<view class="btn-box" v-for="(btn, index) in order.btns" :key="btn">
						<button @tap.stop="onConfirm(orderDetail.id, order.id)" class="u-reset-button btn1" :class="{ btn2: index + 1 === order.btns.length }" v-if="btn === 'get'">
							确认收货
						</button>
						<button
							@tap.stop="onComment(orderDetail.id, order.id)"
							class="u-reset-button btn1"
							:class="{ btn2: index + 1 === order.btns.length }"
							v-if="btn === 'comment'"
						>
							去评价
						</button>
						<button
							@tap.stop="jump('/pages/goods/detail', { id: order.goods_id })"
							class="u-reset-button btn1"
							:class="{ btn2: index + 1 === order.btns.length }"
							v-if="btn === 'buy_again'"
						>
							再次购买
						</button>
						<button
							@tap="onAftersaleDetail(order.ext_arr.aftersale_id)"
							class="u-reset-button btn1"
							:class="{ btn2: index + 1 === order.btns.length }"
							v-if="btn === 'aftersale_info'"
						>
							售后详情
						</button>
						<button
							@tap.stop="onAftersale(orderDetail.id, order.id)"
							class="u-reset-button btn1"
							:class="{ btn2: index + 1 === order.btns.length }"
							v-if="btn === 'aftersale'"
						>
							申请售后
						</button>
						<button
							@tap.stop="onAftersale(orderDetail.id, order.id)"
							class="u-reset-button btn1"
							:class="{ btn2: index + 1 === order.btns.length }"
							v-if="btn === 're_aftersale'"
						>
							重新售后
						</button>
					</view> -->
				</view>
			</view>
		</view>





		<sunexpress v-if="orderDetail.status == 4" @openExpress='openExpressFn' :expressDetail='expressDetail'
			:orderDetail='orderDetail'>
		</sunexpress>
		<sunexpress2 v-if="orderDetail.status==8" @openExpress='openExpressFn2' :expressDetail='expressDetail'
			:orderDetail='orderDetail'>
		</sunexpress2>

		<!-- 订单信息 -->
		<view class="notice-box" v-if="orderDetail.id">
			<view class="notice-box__content">
				<view class="notice-item--center u-flex">
					<text class="title">订单编号：</text>
					<text class="detail">{{ orderDetail.order_sn }}</text>
					<button class="u-reset-button copy-btn" @tap="onCopy(orderDetail.order_sn)">复制</button>
				</view>
				<view class="notice-item--center u-flex">
					<text class="title">创建时间：</text>
					<text class="detail">{{ orderDetail.createtime }}</text>
					<!--  -->
					<button class="perfectbtn" @click="showContractFn()"
						v-if="orderDetail.status == 2 &&orderDetail.step < 3">完善信息</button>
				</view>

				<view class="notice-item--center u-flex" v-if="orderDetail.item[0].express_no">
					<text class="title">快递单号：</text>
					<text class="detail">{{ orderDetail.item[0].express_no }}</text>
					<button class="u-reset-button copy-btn" @tap="onCopy(orderDetail.order_sn)">复制</button>
				</view>
				<view class="notice-item u-flex" v-if="orderDetail.item[0].express_name">
					<text class="title">物流公司：</text>
					<text class="detail">{{ orderDetail.item[0].express_name }}</text>
				</view>
			</view>
		</view>
		<!-- step  1 使命 2 支付 3 合同 -->
		<!-- 	<view class="shimingbtn" v-if="orderDetail.status == -1 && orderDetail.step == 0" @click="jump('/pages/user/real/Realname')">
			实名认证 
		</view> -->

		<!-- v-if="orderDetail.insurance_status == 2" -->
		<!-- #ifdef H5 || APP-PLUS -->
		<brokenPing :ordersn='orderDetail.order_sn' :orderDeatil='orderDetail' v-if="orderDetail.status !=  1 ">
		</brokenPing>
		<!--  #endif -->
		<!-- #ifdef MP-ALIPAY -->
		<brokenPing :ordersn='orderDetail.order_sn' :orderDeatil='orderDetail'
			v-if="orderDetail.status !=  1  && orderDetail.item[0].goods_item.status != 'up'">
		</brokenPing>

		<!--  #endif -->
		<!-- <view  class="" 
			style="height: 140rpx;width: 710rpx;background-color: white;padding-top: 20rpx;margin: 20rpx auto;border-radius: 20rpx;">
			<view class="shimingbtn" @click="perfect()">
				完善信息
			</view>
		</view> -->
		<!-- BrokenOrder -->
		<sunPayorder ref="sun" :idd='idd' @subperiods='subperiodsFn' :list='orderDetail'></sunPayorder>


		<LeaseCompleted :orderId='orderDetail.id' :orderDeatil='orderDetail' v-if="orderDetail.status == 5">
		</LeaseCompleted>
		<!--  价格信息 -->
		<!-- <view class="order-price-box u-m-b-20" v-if="orderDetail.id">
			<view class="notice-item u-flex u-row-between">
				<text class="title">商品总额</text>
				<text class="detail font-OPPOSANS">￥{{ orderDetail.goods_amount }}</text>
			</view>
			<view class="notice-item u-flex u-row-between">
				<text class="title">运费</text>
				<text class="detail font-OPPOSANS">￥{{ orderDetail.dispatch_amount }}</text>
			</view>
			<view class="notice-item u-flex u-row-between">
				<text class="title">优惠金额</text>
				<text class="detail font-OPPOSANS">-￥{{ orderDetail.discount_fee }}</text>
			</view>
			<view class="notice-item u-flex u-row-between" v-if="orderDetail.score_fee">
				<text class="title">积分</text>
				<text class="detail font-OPPOSANS">-{{ orderDetail.score_fee }}积分</text>
			</view>
			<view class="notice-item all-rpice-item u-flex" style="width: 100%;">
				<text class="title">{{ orderDetail.status <= 0 ? '需付款' : '实付款' }}：</text>
				<text class="detail all-price font-OPPOSANS">￥{{ orderDetail.total_fee }}</text>
			</view>
		</view> -->

		<!-- 底部按钮 -->
		<view class="foot-wrap " v-if="orderDetail.status ==2||orderDetail.status == 3||orderDetail.status == 4">
			<view class="foot_box">
				<view class="money-box u-flex ">
					<text class="money-title">已选择{{ periodsNum || '0' }}期 合计:</text>
					<text class="all-price font-OPPOSANS" style="color: #ff5555;">￥{{ totalMoney || '0.00' }}</text>
				</view>
				<view class="btn-box u-flex">
					<button @tap.stop="payMoney(orderDetail.order_sn)" class="u-reset-button obtn1">支付租金</button>
					<!-- #ifdef MP-ALIPAY -->
					<contact-button tnt-inst-id="4rs_kzXF" scene="SCE01234650" size='40'
						icon='https://zuji.jiusuding.cn/uploads/20230107/6a6fd912da973dde993e27050265ea68.png' />
					<!--  #endif -->

					<!-- <view class="" v-for="btn in orderDetail.btns" :key="btn">
						<button v-if="btn === 'cancel'" @tap.stop="onCancel(orderDetail.id)" class="u-reset-button obtn1">取消订单</button>
						<button v-if="btn === 'pay'" @tap.stop="onPay(orderDetail.id)" class="u-reset-button obtn2">付款</button>
						<button v-if="btn === 'groupon'" @tap.stop="jump('/pages/activity/groupon/detail', { id: orderDetail.ext_arr.groupon_id })" class="u-reset-button obtn2">
							拼团详情
						</button>
						<button v-if="btn === 'delete'" @tap.stop="onDelete(orderDetail.id)" class="u-reset-button delete-btn">删除</button>
						
					</view> -->
				</view>
			</view>
		</view>

		<!-- 	<u-modal v-model="showContract" :content="contentContract" show-cancel-button @confirm='confirmContract()'>
		</u-modal>
 -->
		<u-popup v-model="showContract" mode='center' border-radius="14">

			<view class="orderContract2">
				<view class="" style="margin-top: 20rpx;">
					<view class="" style="font-size: 34rpx;text-align: center;font-weight: 600;">
						提示
					</view>
					<view class="" style="margin: 20rpx 0;text-align: center;">
						信息完善后将签订合同
					</view>
				</view>

				<!-- #ifdef H5 -->
				<view class="eBtn" @click="perfect(1)">签订e签宝合同</view>
				<view class="antBtn" @click="perfect(2)">签订蚂蚁合同</view>
				<!-- #endif -->

				<!-- #ifdef MP-ALIPAY -->
				<view class="antBtn" @click="perfect(2)" v-if="antShow">签订蚂蚁合同</view>
				<!-- #endif -->
			</view>
		</u-popup>


		<u-popup v-model="payTypeShow" mode='bottom' border-radius="14">

			<view class="orderContract">
				<view class="" style="margin-top: 20rpx;">
					<view class="" style="font-size: 34rpx;text-align: center;">
						应付租金
					</view>
					<view class=""
						style="margin: 20rpx 0;text-align: center;color: #FF4747;font-size: 36rpx;font-weight: 600;">
						￥{{ totalMoney || '0' }}元
					</view>

					<view class="" style="display: flex;justify-content: center;margin-top: 40rpx;">
						<image v-if="QRbtn== ''" src="../../static/images/defaultQR.png" mode=""
							style="width: 400rpx;height: 400rpx;">
						</image>
						<!-- 微信支付 -->
						<image v-if="QRbtn == 2" :src="$BASE_URL + payQr[0]" mode=""
							style="width: 400rpx;height: 400rpx;">
						</image>
						<!-- 支付宝支付 -->
						<image v-if="QRbtn  == 1" :src="$BASE_URL + payQr[1]" mode=""
							style="width: 400rpx;height: 400rpx;">
						</image>
					</view>

					<view class="selectBtn">

						<!-- 	<view class="" v-if="QRbtn==''">
							请选择支付您的方式获取支付二维码
						</view> -->
						<view class="alipayQR QRbtn"
							:style="{backgroundColor:QRbtn==1? '#1678FF':'#F9F9F9',color:QRbtn ==1? '#fff':'#666'}"
							@click="selectBtn(1)">
							<view class="notselected" v-if="QRbtn != 1">

							</view>

							<image v-if="QRbtn == 1" src="../../imgs/pay/activeIcon.png" mode=""
								style="width: 40rpx;height: 40rpx;">
							</image>

							<image v-if="QRbtn == 1" src="../../imgs/pay/alipayActive.png" mode=""
								style="width: 36rpx;height: 36rpx;">
							</image>

							<image v-if="QRbtn != 1" src="../../imgs/pay/alipayIcon.png" mode=""
								style="width: 36rpx;height: 36rpx;">
							</image>
							<view>支付宝支付</view>
						</view>
						<view class="wechatQR QRbtn"
							:style="{backgroundColor:QRbtn==2? '#15ba11':'#F9F9F9',color:QRbtn ==2? '#fff':'#666'}"
							@click="selectBtn(2)">
							<!-- 没有选中 显示 -->
							<view class="notselected" v-if="QRbtn != 2">

							</view>
							<!-- 选中之后显示 -->
							<image v-if="QRbtn == 2" src="../../imgs/pay/activeIcon.png" mode=""
								style="width: 40rpx;height: 40rpx;">
							</image>
							<image v-if="QRbtn == 2" src="../../imgs/pay/weChatActive.png" mode=""
								style="width: 40rpx;height: 32rpx;">
							</image>
							<image v-if="QRbtn != 2" src="../../imgs/pay/weChatIcon.png" mode=""
								style="width: 40rpx;height: 32rpx;">
							</image>




							<view>微信支付</view>
						</view>
					</view>

				</view>

				<view class="tips" v-if="QRbtn ==1">
					截图保存并打开支付宝支付
				</view>
				<view class="tips" v-if="QRbtn == 2">
					截图保存并打开微信支付
				</view>
				<!-- <view class="wechatbtn" @click="paytype(1)">微信支付</view> -->
				<view v-if="QRbtn == 1" class="alipaybtn" @click="paytype(2)">打开支付宝</view>
				<view v-if="QRbtn == 2" class="wechatbtn" @click="paytype(1)">打开微信</view>
			</view>
		</u-popup>

		<u-popup v-model="tipsShow" mode='center' border-radius="14">
			<view class="toPayTips">
				<view class=""
					style="font-size: 36rpx;color: #333;font-weight: 500;text-align: center;margin-bottom: 40rpx;">
					温馨提醒
				</view>
				<view class="" style="font-size: 28rpx;color: #999;line-height: 28rpx;text-align: center;">
					如已截图请打开{{openPaytype == 2 ?"支付宝":'微信'}}扫码进行付款操作
					若没截图请返回截图后继续操作
				</view>
				<view class="" style="display: flex;justify-content: space-between;margin-top: 60rpx;">
					<view class="returnBtn" @click="tipsShow= false">
						返回截图
					</view>
					<view class="openBtn" @click='openAliorWechat()'
						:style="{backgroundColor: openPaytype == 2 ?'#1677ff':'#07c160'}">
						{{openPaytype == 2 ?"打开支付宝":'打开微信'}}
					</view>
				</view>
			</view>
		</u-popup>
		<view v-if="toPayShow">
			<web-view :webview-styles="webviewStyles" :src="toPay"></web-view>
		</view>
	</view>
</template>

<script>
	import sunPayorder from './components/sun-payorder.vue'
	import sunexpress from './components/sun-express.vue'
	import sunexpress2 from './components/sun-express2.vue'
	import brokenPing from './components/brokenPing.vue'
	// import expressDeatil from './express/express-detail.vue'
	import LeaseCompleted from './components/LeaseCompleted.vue'

	// const esignPlugin = requirePlugin("esign");
	export default {
		components: {
			sunexpress2,
			brokenPing,
			LeaseCompleted,
			sunPayorder,
			sunexpress,
			// expressDeatil
		},
		data() {
			return {
				webviewStyles: {
					hieght: '1'
				},
				toPay: '',
				toPayShow: false,
				mask: true,
				contentContract: '确定要完善信息，签订合同吗？',
				showContract: false,
				show: false,
				selectList: [],
				totalMoney: 0,
				periodsNum: 0, //选了几期
				idd: '',
				time: 0,
				payTypeShow: false,
				orderDetail: {},
				orderStatus: {
					'-2': '已关闭',
					'-1': '已取消',
					'0': '未付款',
					'1': '已付款',
					'2': '已完成'
				},
				payType: {
					// wallet: '余额支付',
					wechat: '微信支付',
					alipay: '支付宝支付',
					// iospay: 'ApplePay'
				},
				expressType: {
					express: '物流快递',
					selfetch: '到店/自提',
					store: '商家配送',
					autosend: '自动发货'
				},
				expressDetail: {}, //物流信息
				exrpessLog: [], //包裹轨迹
				firstGoods: {}, //商品列表
				goodsList: [],
				suntimer: null,
				arrList: [], //开关
				antShow: false,
				eShow: false,
				QRbtn: '',
				payQr: [],
				openPaytype: '',
				tipsShow: false
			};
		},

		created() {

		},
		mounted() {

			this.$http('common.getPic', {}).then(res => {
				if (res.code === 1) {
					console.log(res);
					// this.arrList = res.data.result.contract_status
					var str = res.data.result.contract_status
					this.eShow = str.search("1") != -1
					this.antShow = str.search("2") != -1
					this.payQr = res.data.result.payQR

					console.log(this.antShow);
					console.log(this.eShow);


				}
			});
		},
		onShow() {
			// uni.showToast({
			// 	title:'这是'+ uni.getStorageSync('platform')
			// })
			
			// uni.$on('updateData', (data) => {
			// 	this.testdata = data
			// 	// this.subOrder()
			// 	this.stepChange(1, this.orderSn)
			// 	// console.log('监听到事件来自 updateData ，携带参数为：' + data);
			// })
			this.payTypeShow = false
			this.getOrderDetail()


			// #ifdef H5 
			setTimeout(() => {
				this.getOrderDetail()
			}, 1000)

			//  #endif
		},
		onLoad(e) {
			// console.log(e);
			this.idd = e.id
			// this.getOrderDetail();
			this.getExpressList()

			// esignPlugin.addEventListener('signStatusInfo', ({
			// 	code,
			// 	message
			// }) => {
			// 	console.log('code', code)
			// 	console.log('message', message)
			// 	if (code == '000') {
			// 		if (this.suntimer) return clearTimeout(this.suntimer)
			// 		this.suntimer = setTimeout(() => {
			// 			// this.getAuthCode()
			// 			uni.navigateBack({
			// 				delta: 1
			// 			})
			// 			clearTimeout(this.suntimer)
			// 		}, 500)



			// 	}


			// });


		},
		computed: {
			allNum() {
				if (this.orderDetail.item) {
					let items = this.orderDetail.item;
					let allPrice = 0;
					items.forEach(p => {
						allPrice += p.goods_num;
					});
					return allPrice;
				}
			},

		},
		methods: {
			openAliorWechat() {

				if (this.openPaytype == 1) {
					window.location.href = "weixin://";
					// var ua = navigator.userAgent.toLowerCase();
					// if (ua.match(/MicroMessenger/i) == "micromessenger") {
					// 	window.location.href = "weixin://";
					// } else {
					// 	alert("请先安装微信！");
					// }



				}
				if (this.openPaytype == 2) {
					window.location.href = 'alipays://'
					// uni.showLoading({
					// 	title: '加载中'
					// })
					// this.$http('order.setStage', {
					// 	order_sn: this.currentSn,
					// 	check_stage: this.selectList.join(','),
					// 	canal: "app",
					// 	mold: "alipay_wap"
					// }).then(res => {
					// 	console.log(res, 'res');
					// 	if (res.code == 1) {
					// 		// #ifdef H5
					// 		window.location.href = res.data.order.data.expend.pay_info
					// 		//  #endif
					// 		// #ifdef APP-PLUS
					// 		// plus.runtime.openURL(res.data.order.data.expend.pay_info)
					// 		this.toPay = res.data.order.data.expend.pay_info
					// 		this.toPayShow = true

					// 		// #endif
					// 	} else {

					// 	}
					// 	uni.hideLoading()
					// })

				}

			},
			// 选择点击的按钮
			selectBtn(i) {
				this.QRbtn = i


			},
			paytype(num) {

				this.openPaytype = num

				this.tipsShow = true





			},
			// paytype(num) {


			// if (num == 1) {
			// 	uni.showToast({
			// 		title: "功能开发中..."

			// 	})
			// }
			// if (num == 2) {

			// 	uni.showLoading({
			// 		title: '加载中'
			// 	})
			// 	this.$http('order.setStage', {
			// 		order_sn: this.orderDetail.order_sn,
			// 		check_stage: this.selectList.join(','),
			// 		canal: "app",
			// 		mold: "alipay_wap"
			// 	}).then(res => {
			// 		console.log(res, 'res');
			// 		if (res.code == 1) {
			// 			// #ifdef H5
			// 			window.location.href = res.data.order.data.expend.pay_info
			// 			//  #endif
			// 			// #ifdef APP-PLUS	
			// 			// plus.runtime.openURL(res.data.order.data.expend.pay_info)
			// 			this.toPay = res.data.order.data.expend.pay_info
			// 			this.toPayShow = true

			// 			// #endif
			// 		} else {

			// 		}
			// 		uni.hideLoading()
			// 	})

			// }

			// },

			showContractFn() {
				// console.log(123);
				this.showContract = true
			},
			// confirmContract() {
			// 	this.perfect()
			// },
			getSignUrl(aliSchema) {
				if (!aliSchema) {
					return ''
				}
				const querys = aliSchema.split('?')[1].split('&');
				const signUrlKeyValue = querys.find((item) => item.includes('query=')).replace('query=', '');
				const encodedSignUrl = decodeURIComponent(signUrlKeyValue).replace('signUrl=', '');
				return encodedSignUrl
			},
			antContract(id) {
				this.$http('common.antContract', {
					order_sn: id
				}).then(res => {
					console.log(res);


					// #ifdef MP-ALIPAY

					let finalSignUrl; // 最终需要跳转的签署地址
					const alipaySignUrl = res.data.result.signurlGetResult.url;
					finalSignUrl = this.getSignUrl(alipaySignUrl);

					my.navigateToMiniProgram({
						"appId": "2021001152620480",
						"path": "pages/signH5/index",
						"query": {
							"signUrl": finalSignUrl
						},
						success: (res) => {
							console.log(JSON.stringify(res))
						},
						fail: (res) => {
							if (res.error == 30) {
								my.alert({
									content: '目标小程序设置了不允许跳转'
								});
							} else {
								my.showToast({
									content: '跳转失败'
								});
							}
						}
					});

					// 	#endif

					//  #ifdef H5
					console.log(res.data);
					console.log(123);
					window.location.href = res.data.result.signurlGetResult.shortUrl
					// #endif



				})




			},
			// 完善信息
			perfect(num) {


				this.$http('user.info').then(res => {
					// 是否通过实名验证  通过走1 
					if (res.data.real_status == 1) {
						//  当前步骤 第一步走下面
						if (this.orderDetail.step == 1) {
							this.$http('order.payinfo', {
								order_sn: this.orderDetail.order_sn
							}).then(res => {
								if (res.code == 1) {
									if (res.data.pay_status == 1) {

										my.tradePay({
											tradeNO: res.data.orderResult.body.trade_no,
											success: (res) => {
												if (res.resultCode == 9000) {
													uni.showLoading({
														title: '加载中'
													});
													this.getOrderDetail()

													if (num == 1) {
														this.LaunchContract(this.orderDetail
															.order_sn)
													}


													if (num == 2) {
														this.antContract(this.orderDetail
															.order_sn)
													}
												}
											},
											fail: (res) => {}
										});
									}
								}
								// console.log(res);
							})
						}
						// 
						if (this.orderDetail.step == 2) {
							uni.showLoading({
								title: '加载中'
							});
							if (num == 1) {
								this.LaunchContract(this.orderDetail.order_sn)
							}
							if (num == 2) {
								this.antContract(this.orderDetail.order_sn)
							}
						}
					} else {
						uni.navigateTo({
							url: '/pages/user/real/Realname'
						})
						return false
					}
				})






			},
			LaunchContract(id) {

				// this.orderSn = id
				this.$http('order.contract', {
					order_sn: id
				}).then(res => {
					console.log(res);
					if (res.code == 1) {
						// 沙箱环境  sml
						// prod 正式环境
						let env = 'prod'
						let flowId = res.data.type == 2 ? res.data.result.signFlowid : res.data.result.flowid
						let signerId = res.data.type == 2 ? res.data.result.accountId : res.data.accountId
						let skipGuide = true
						let skipResult = true
						// #ifdef MP-ALIPAY

						my.navigateTo({
							url: `plugin://esign/esign?env=${env}&flowId=${flowId}&signerId=${signerId}&skipResult=${skipResult}&skipGuide=${skipGuide}`,
						})
						//  #endif

						// #ifdef H5

						// console.log( res.data,' res.data');
						let url = res.data.type == 1 ? res.data.result.url : res.data.result.urlData.url

						window.location.href = url

						// #endif

						setTimeout(() => {
							uni.hideLoading();
						}, 5000)
					}

				})



			},

			stepChange(step_, sn_) {
				this.$http('order.changeStep', {
					step: step_,
					order_sn: this.orderDetail.order_sn
				}).then(res => {
					this.getOrderDetail()
				})
			},

			getExpressList() {
				let that = this;
				that.$http('order.expressList', {
					order_id: that.idd
				}).then(res => {
					if (res.code === 1) {
						if (res.data.length == 1) {
							that.getExpressDetail(res.data[0].id, that.idd)


							// this.jump('/pages/order/express/express-detail', { orderId: orderId, expressId: res.data[0].id });
						} else if (res.data.length > 1) {
							// this.jump('/pages/order/express/express-list', { orderId: orderId });
						} else {
							// that.$u.toast('暂无包裹~');
						}
					}
				});

			},
			//获取物流信息
			getExpressDetail(eid, oid) {
				let that = this;
				that.$http('order.expressDetail', {
					id: eid,
					order_id: oid
				}).then(res => {
					if (res.code === 1) {
						that.expressDetail = res.data;
						that.goodsList = res.data.item;

						that.exrpessLog = res.data.log.reverse()
						that.firstGoods = res.data.item[0];
					}
				});
			},




			// 打开弹层快递
			openExpressFn() {
				this.onExpress(this.orderDetail.id)
				// this.show  = true

			},
			// 打开弹层快递
			openExpressFn2() {
				// this.onExpress(this.orderDetail.id)		
				uni.navigateTo({
					url: `/pages/order/express/express-detail2?orderId=${this.orderDetail.id}`,
				})
			},
			
			
			isWechat() {
				var ua = window.navigator.userAgent.toLowerCase();
				if (ua.match(/micromessenger/i) == "micromessenger") {
					return true;
				} else {
					return false;
				}
			},
			payMoney(sn) {




				uni.showLoading({
					title: '加载中'
				})
				this.$http('order.setStage', {
					order_sn: sn,
					check_stage: this.selectList.join(','),
				}).then(res => {
					console.log(res);
					if (res.code == 1) {
						
							uni.hideLoading()
						
						//  #ifdef MP-ALIPAY
						my.tradePay({
							// 调用统一收单交易创建接口（alipay.trade.create），获得返回字段支付宝交易号trade_no
							tradeNO: res.data.order.data.trade_no,
							success: (res) => {
								this.selectList = []
								// console.log(11111111);
								uni.hideLoading()
								this.getOrderDetail();
								this.reset()
							},
							fail: (res) => {
								uni.hideLoading()
							}
						});
						//  #endif
						//  #ifdef APP-PLUS 
	
						// uni.showToast({
						// 	title:'这是'+ uni.getStorageSync('platform')
						// })
							window.location.href = res.data.order.data.expend.pay_info
					
						//  #endif

						//  #ifdef  H5
						
						if (this.isWechat()) {
							// 微信环境
							let payinfo = {
								partnerid: '1649453056',
								...res.data.order.data
							}
							// // console.log(payinfo);
						
						
						
							WeixinJSBridge.invoke('getBrandWCPayRequest', {
									"appId": payinfo.appId, //公众号ID，由商户传入
									"timeStamp": payinfo.timeStamp.toString(), //时间戳，自1970年以来的秒数
									"nonceStr": payinfo.nonceStr, //随机串
									"package": payinfo.package,
									"signType": payinfo.signType, //微信签名方式：
									"paySign": payinfo.paySign, //微信签名
								},
								(res) => {
									// 支付成功
									if (res.err_msg == "get_brand_wcpay_request:ok") {
										// 使用以上方式判断前端返回,微信团队郑重提示：
										//res.err_msg将在用户支付成功后返回ok，但并不保证它绝对可靠。
						
										this.selectList = []
										uni.hideLoading()
										this.orderList = [];
										this.getOrderDetail()
										// this.currentPage = 1;
										// this.lastPage = 1;
										// this.getOrderList();
									}
									// 支付过程中用户取消
									if (res.err_msg == "get_brand_wcpay_request:cancel") {
						
									}
									// 支付失败
									if (res.err_msg == "get_brand_wcpay_request:fail") {
						
									}
								});
						
						
						} else {
							// 其他环境
							if (this.selectList.length == 0) {
						
								return uni.showToast({
									title: '请选择要支付的账单分期',
									icon: 'none'
								})
							}
							// this.currentSn = sn
							// this.payTypeShow = true
						
							window.location.href = res.data.order.data.expend.pay_info
						}
						
						// uni.showToast({
						// 	title:'这是'+ uni.getStorageSync('platform')
						// })
						
						// window.location.href = res.data.order.data.expend.pay_info
							

							
						// if (this.periodsNum == 0) {

						// 	return uni.showToast({
						// 		title: '请选择要支付的账单分期',
						// 		icon: 'none'
						// 	})
						// }
						// this.payTypeShow = true
						//  #endif

					} else {
						uni.hideLoading()
					}

				})




				//  #ifdef APP-PLUS || H5

				// if (this.periodsNum == 0) {

				// 	return uni.showToast({
				// 		title: '请选择要支付的账单分期',
				// 		icon: 'none'
				// 	})
				// }
				// this.payTypeShow = true


				//  #endif

			},
			reset() {
				// 重置参数
				this.selectList = []
				this.totalMoney = 0
				this.periodsNum = 0
				this.$refs.sun.selectList = []
			},
			// 计算期数
			subperiodsFn(data) {
				// console.log(data);
				this.selectList = data
				// console.log(this.orderDetail,'orderDetail');
				let sub = 0
				if (data.length > 0) {

					data.forEach(item => {

						this.orderDetail.stages.forEach(i => {

							if (item == i.id) {
								sub = sub + parseFloat(i.money)

							}
						})

					})
				}

				this.totalMoney = sub.toFixed(2)

				this.periodsNum = data.length
			},
			jump(path, parmas) {
				this.$Router.push({
					path: path,
					query: parmas
				});
			},
			// 详情发货信息
			goDistribution(dispatchType, orderId, orderItemId) {
				this.jump('/pages/order/express/distribution-detail', {
					expressType: dispatchType,
					orderId: orderId,
					orderItemId: orderItemId
				});
			},
			// 订单详情
			getOrderDetail() {

				// let that = this;
				// that.idd = that.$Route.query.id
				// console.log( that.$Route.query.id,' that.$Route.query.id');
				this.$http('order.detail', {
					id: this.idd
				}).then(res => {
					if (res.code === 1) {
						this.orderDetail = res.data;

						console.log(this.orderDetail, 'orderDetail');
						this.orderDetail.createtime = this.$u.timeFormat(res.data.createtime, 'yyyy-mm-dd hh:MM');
						this.orderDetail.paytime = this.$u.timeFormat(res.data.paytime, 'yyyy-mm-dd hh:MM');
						this.mask = false
					}
				});
			},
			// 复制
			onCopy(code) {
				let that = this;
				uni.setClipboardData({
					data: code,
					success: function(data) {
						that.$u.toast('已复制到剪切板');
					}
				});
			},

			// 确认收货
			onConfirm(id, itemId) {
				let that = this;
				that.$http(
					'order.confirm', {
						id: id,
						order_item_id: itemId
					},
					'确认中...'
				).then(res => {
					if (res.code === 1) {
						that.getOrderDetail();
					}
				});
			},

			// 申请售后
			onAftersale(orderId, orderItemId) {
				this.$Router.push({
					path: '/pages/order/after-sale/refund',
					query: {
						orderId: orderId,
						orderItemId: orderItemId
					}
				});
			},

			// 售后详情
			onAftersaleDetail(id) {
				this.jump('/pages/order/after-sale/detail', {
					aftersaleId: id
				});
			},

			// 取消订单
			onCancel(id) {
				let that = this;
				that.$http(
					'order.cancel', {
						id: id
					},
					'取消中...'
				).then(res => {
					if (res.code === 1) {
						that.$Router.back();
					}
				});
			},

			// 立即购买
			onPay(id) {
				uni.navigateTo({
					url: `/pages/order/payment/method?orderId=${id}`
				});
			},

			// 删除订单
			onDelete(orderId) {
				let that = this;
				uni.showModal({
					title: '删除订单',
					content: '确定要删除这个订单么？',
					cancelText: '取消',
					confirmText: '删除',
					success: res => {
						if (res.confirm) {
							that.$http('order.deleteOrder', {
								id: orderId
							}).then(res => {
								if (res.code === 1) {
									that.$Router.back();
								}
							});
						}
					}
				});
			},

			// 待评价
			onComment(orderId, orderItemId) {
				this.jump('/pages/goods/comment/add-comment', {
					orderId: orderId,
					orderItemId: orderItemId
				});
			},

			// 查看物流
			onExpress(orderId, orderItemId) {
				let that = this;
				that.$http('order.expressList', {
					order_id: orderId
				}).then(res => {
					if (res.code === 1) {
						if (res.data.length == 1) {

							// this.jump('/pages/order/express/express-detail', { orderId: orderId, expressId: res.data[0].id });
							uni.navigateTo({
								url: `/pages/order/express/express-detail?orderId=${orderId}&expressId=${res.data[0].id}`,
							})


						} else if (res.data.length > 1) {
							this.jump('/pages/order/express/express-list', {
								orderId: orderId
							});
						} else {
							this.$u.toast('暂无包裹~');
						}
					}
				});
			}
		}
	};
</script>

<style lang="scss" scoped>
	.toPayTips {
		width: 600rpx;
		// height: 460rpx;
		border-radius: 20rpx;
		// opacity: 1;

		background: #FFFFFF;
		box-sizing: border-box;
		padding: 48rpx;

		.returnBtn {
			width: 212rpx;
			height: 72rpx;
			line-height: 72rpx;
			border-radius: 8rpx;
			opacity: 1;
			text-align: center;
			box-sizing: border-box;
			border: 2rpx solid #EBEBEB;
		}

		.openBtn {
			width: 212rpx;
			height: 72rpx;
			line-height: 72rpx;
			border-radius: 8rpx;
			opacity: 1;
			text-align: center;
			box-sizing: border-box;
			border: 2rpx solid #EBEBEB;
			background-color: #3662EC;
			color: #fff;
		}

		.returnBtn:active {
			background-color: #f7f7f7;
		}

		.openBtn:active {
			// background-color: #3a6bff;
		}
	}

	.selectBtn {
		display: flex;
		justify-content: space-between;
		margin-top: 138rpx;

		.QRbtn {
			color: #666;
			width: 312rpx;
			height: 88rpx;
			border-radius: 120rpx;
			background: #F9F9F9;
			display: flex;
			align-items: center;
			justify-content: space-around;
			box-sizing: border-box;
			padding: 0 20rpx;
		}

		.notselected {
			width: 40rpx;
			height: 40rpx;
			border-radius: 20rpx;
			border: 1rpx solid #CCCCCC;

		}

	}

	.orderContract2 {
		width: 100%;
		// height: 1140rpx;
		padding: 46rpx;
		background-color: #fff;
		border-radius: 20rpx !important;

		.wechatbtn {

			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border: 2rpx solid #15ba11;

			margin-bottom: 20rpx;
			text-align: center;
			color: #fff;
			background-color: #15ba11;
			border-radius: 60rpx;
			margin-top: 70rpx;
		}

		.tips {
			position: absolute;
			top: 650rpx;
			left: 50%;
			transform: translateX(-50%);
			width: 590rpx;
			height: 70rpx;
			border-radius: 40rpx;
			opacity: 1;
			color: #FF4747;
			text-align: center;
			line-height: 70rpx;
			background: rgba(255, 71, 71, 0.08);
		}

		.alipaybtn {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border: 2rpx solid #1677ff;

			margin-bottom: 20rpx;
			text-align: center;
			color: #fff;
			background-color: #1677ff;
			border-radius: 60rpx;
			margin-top: 70rpx;
		}

		.wechatbtn:active {
			background-color: #07c160;
			color: #fff;

		}

		.alipaybtn:active {
			background-color: #1571f3;
			color: #fff;
		}

		.eBtn,
		.antBtn {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border: 2rpx solid #fc6056;
			border-radius: 10rpx;
			margin-bottom: 20rpx;
			text-align: center;
			color: #fc6056;
		}



		.eBtn:active {
			background-color: gainsboro;

		}

		.antBtn:active {
			color: #fff;
			background-color: #fc6056;
		}
	}

	.orderContract {

		width: 100%;
		height: 1140rpx;
		padding: 46rpx;
		background-color: #fff;
		border-radius: 20rpx !important;


		.wechatbtn {

			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border: 2rpx solid #15ba11;

			margin-bottom: 20rpx;
			text-align: center;
			color: #fff;
			background-color: #15ba11;
			border-radius: 60rpx;
			margin-top: 70rpx;
		}

		.tips {
			position: absolute;
			top: 650rpx;
			left: 50%;
			transform: translateX(-50%);
			width: 590rpx;
			height: 70rpx;
			border-radius: 40rpx;
			opacity: 1;
			color: #FF4747;
			text-align: center;
			line-height: 70rpx;
			background: rgba(255, 71, 71, 0.08);
		}

		.alipaybtn {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border: 2rpx solid #1677ff;

			margin-bottom: 20rpx;
			text-align: center;
			color: #fff;
			background-color: #1677ff;
			border-radius: 60rpx;
			margin-top: 70rpx;
		}

		.wechatbtn:active {
			background-color: #07c160;
			color: #fff;

		}

		.alipaybtn:active {
			background-color: #1571f3;
			color: #fff;
		}

		.eBtn,
		.antBtn {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border: 2rpx solid #fc6056;
			border-radius: 10rpx;
			margin-bottom: 20rpx;
			text-align: center;
			color: #fc6056;
		}



		.eBtn:active {
			background-color: gainsboro;

		}

		.antBtn:active {
			color: #fff;
			background-color: #fc6056;
		}
	}

	.perfectbtn {
		background-color: #f75146;
		color: white;
		height: 40rpx;
		line-height: 40rpx;
		border-radius: 20rpx;
		width: 156rpx;
		font-size: 22rpx;
	}

	.order-detail-wrap {
		background-color: #f6f6f6;
		padding-bottom: 140rpx;
		position: relative;


		.shimingbtn {
			// float: right;
			// position: relative;
			// right: 0;

			margin: 0 auto;
			width: 640rpx;
			font-size: 32rpx;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			color: white;
			background-color: #fb4c44;
			border-radius: 44rpx;
		}

		.shimingbtn:active {
			background-color: #e4433d;
		}
	}

	.detail-head {
		background: linear-gradient(0deg, #fe7c70 0%, #fb4c44 100%) no-repeat;
		background-size: 100% 180rpx;
		height: 180rpx;

		.state-box {
			padding: 30rpx 40rpx;
			color: rgba(#fff, 0.9);

			.state-img {
				width: 60rpx;
				height: 60rpx;
				// background: #ccc;
				margin-right: 40rpx;
			}
		}
	}

	// 收货地址
	.address-wrap {
		position: relative;
		background-color: #fff;
		min-height: 160rpx;
		width: 100%;
		margin-bottom: 20rpx;
	}

	.order-address-box {
		width: 710rpx;
		left: 50%;
		transform: translateX(-50%);
		top: -50rpx;
		background-color: #fff;
		min-height: 160rpx;
		border-radius: 20rpx;
		padding: 20rpx;
		font-size: 30rpx;

		font-weight: 500;
		color: rgba(51, 51, 51, 1);
		position: absolute;

		.address-username {
			margin-right: 20rpx;
		}

		.address-detail {
			font-size: 26rpx;

			font-weight: 500;
			color: rgba(153, 153, 153, 1);
			margin-top: 20rpx;
		}
	}

	.detail-goods {
		margin: 0 auto;
		margin-bottom: 20rpx;
		width: 710rpx;
		margin-top: -40rpx;
		box-sizing: border-box;
		border-radius: 20rpx;

		.order-list {
			margin-bottom: 20rpx;
			background-color: #fff;
			padding: 0 20rpx;
			border-radius: 20rpx;

			.order-card {
				padding: 20rpx 0;

				.order-sku {
					font-size: 24rpx;

					font-weight: 400;
					color: rgba(153, 153, 153, 1);
					width: 450rpx;
					margin-bottom: 20rpx;

					.order-num {
						margin-right: 10rpx;
					}
				}

				.card-price-box {
					.status-btn {
						height: 32rpx;
						border: 1rpx solid rgba(207, 169, 114, 1);
						border-radius: 15rpx;
						font-size: 20rpx;
						font-weight: 400;
						color: rgba(168, 112, 13, 1);
						padding: 0 10rpx;
						margin-left: 20rpx;
						background: rgba(233, 183, 102, 0.16);
					}

					.order-price {
						font-size: 26rpx;

						font-weight: 600;
						color: rgba(51, 51, 51, 1);
					}
				}
			}

			// 配送方式
			.express-type-box {
				// width: 710rpx;
				height: 90rpx;
				background: rgba(247, 247, 247, 1);
				border-radius: 10rpx;
				padding: 0 20rpx;

				.express-type--title {
					font-size: 28rpx;

					font-weight: 400;
					color: rgba(153, 153, 153, 1);
				}

				.express-type--content {
					font-size: 26rpx;

					font-weight: 500;
					color: rgba(51, 51, 51, 1);
				}

				.express-type--detail {
					font-size: 24rpx;

					font-weight: 400;
					color: rgba(153, 153, 153, 1);
					line-height: 30rpx;
				}
			}

			.refund_msg {
				font-size: 28rpx;
				color: #999;
				flex: 1;
				text-align: left;
			}

			.order-bottom {
				background: #fff;
				justify-content: flex-end;
				padding: 20rpx 0;

				.btn1 {
					width: 160rpx;
					line-height: 60rpx;
					border: 1rpx solid rgba(223, 223, 223, 1);
					border-radius: 30rpx;
					font-size: 26rpx;
					background: #fff;
					padding: 0;
					margin-right: 20rpx;
				}

				.btn2 {
					width: 160rpx;
					line-height: 60rpx;
					border: 1rpx solid rgba(213, 166, 90, 1) !important;
					border-radius: 30rpx;
					font-size: 26rpx;
					color: #d5a65a !important;
					padding: 0;
					background: #fff;
					margin-right: 20rpx;
				}
			}
		}
	}

	// 拼团项目
	.group-box {
		background: #fff;
		padding: 40rpx 0;
		height: 250rpx;
		margin-bottom: 20rpx;

		.tip-box {
			font-size: 28rpx;
		}

		.title-box {
			font-size: 26rpx;
			font-weight: bold;
			color: #333;

			.group-num {
				color: #f8002c;
			}

			.count-down-tip {
				font-size: 24rpx;
				padding-left: 10rpx;
			}

			.time-box {
				font-size: 18rpx;

				.count-text {
					display: inline-block;
					background-color: #383a46;
					color: #fff;
					font-size: 18rpx;
					border-radius: 2rpx;
					padding: 0 5rpx;
					height: 28rpx;
					text-align: center;
					line-height: 28rpx;
					margin: 0 6rpx;
				}
			}
		}

		.group-people {
			.img-box {
				position: relative;
				margin-right: 20rpx;

				.tag {
					position: absolute;
					line-height: 36rpx;
					background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
					border-radius: 18rpx;
					padding: 0 10rpx;
					white-space: nowrap;
					font-size: 24rpx;
					color: #784f06;
					z-index: 2;
					top: -10rpx;
				}

				.avatar {
					width: 80rpx;
					height: 80rpx;
					border-radius: 50%;
					background: #ccc;
				}
			}
		}
	}

	// 收货信息、订单信息。
	.notice-box {
		width: 710rpx;
		border-radius: 20rpx;
		margin: 0 auto;

		background: #fff;
		margin-bottom: 20rpx;

		.notice-box__head {
			font-size: 30rpx;

			font-weight: 500;
			color: rgba(51, 51, 51, 1);
			line-height: 80rpx;
			border-bottom: 1rpx solid #dfdfdf;
			padding: 0 25rpx;
		}

		.notice-box__content {
			padding: 25rpx;

			.self-pickup-box {
				width: 100%;

				.self-pickup--img {
					width: 200rpx;
					height: 200rpx;
					margin: 40rpx 0;
				}
			}
		}

		.notice-item--center {
			// margin-bottom: 10rpx;
		}

		.notice-item,
		.notice-item--center {
			height: 50rpx;
			align-items: center;

			.title {
				font-size: 24rpx;
				color: #999;
				text-align: justify;
				text-align-last: justify;
				text-justify: distribute-all-lines;
				width: 140rpx;
			}

			.detail {
				font-size: 24rpx;
				color: #333;
				flex: 1;
			}

			.copy-btn {
				height: 40rpx;
				width: 100rpx;
				line-height: 40rpx;
				border-radius: 20rpx;
				padding: 0;
				background: rgba(238, 238, 238, 1);
				font-size: 22rpx;

				font-weight: 400;
				color: rgba(51, 51, 51, 1);
				margin-left: 30rpx;
			}
		}

		.notice-item--center {
			align-items: center;
		}
	}

	// 订单价格信息
	.order-price-box {
		background-color: #fff;
		padding: 20rpx;
		margin-bottom: 20rpx;

		.notice-item {
			height: 50rpx;

			.title {
				font-size: 28rpx;
				color: #999;
			}

			.detail {
				font-size: 28rpx;
				color: #333;
			}
		}

		.all-rpice-item {
			justify-content: flex-end;

			.all-price {
				font-size: 26rpx;
				color: #ff0000;
			}
		}
	}

	.foot-wrap {
		width: 750rpx;
		height: 140rpx;
		position: fixed;
		bottom: 0;
		left: 0;
	}

	.foot_box {
		width: 750rpx;
		min-height: 140rpx;
		background: rgba(255, 255, 255, 1);
		border: 1rpx solid rgba(238, 238, 238, 1);
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-around;
		box-sizing: border-box;
		padding: 20rpx 0;

		.money-box {
			height: 60rpx;
			padding: 0 20rpx;

			.money-title {
				font-size: 26rpx;
				color: #999999;
			}

			.all-price {
				color: #333;
				font-size: 26rpx;
			}
		}

		.btn-box {
			width: 40%;
			justify-content: flex-end;

			// margin-bottom: 20rpx;
			.delete-btn {
				background: #ffeeee;
				color: #e50808;
				width: 160rpx;
				line-height: 60rpx;
				border-radius: 30rpx;
				font-size: 26rpx;
				font-weight: 400;
				margin-right: 20rpx;
				padding: 0;
			}

			.obtn1 {
				width: 100%;
				line-height: 80rpx;
				height: 80rpx;
				background: #ff5555;
				border-radius: 40rpx;
				font-size: 26rpx;
				font-weight: 400;
				color: white;
				margin-right: 20rpx;
				padding: 0;
			}

			.obtn2 {
				width: 160rpx;
				line-height: 60rpx;
				background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
				box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
				border-radius: 30rpx;
				margin-right: 20rpx;
				font-size: 26rpx;
				font-weight: 400;
				color: #fff;
				padding: 0;
			}
		}
	}


	.mask-loading {
		margin-top: 200rpx;
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translateX(-50%);
		width: 200rpx;
		height: 200rpx;
		background-color: #333;
		opacity: 0.8;
		border-radius: 10rpx;
		color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
</style>
